x = 'hello 你好 小猪童鞋'
encode = x.encode('gbk')
print(encode)  # b'hello \xc4\xe3\xba\xc3 \xd0\xa1\xd6\xed\xcd\xaf\xd0\xac'
decode = encode.decode('gbk')
print(decode)  # hello 你好 小猪童鞋

# 常见的编码格式：utf-8 gbk gb2312 acsii unicode
